package com.design.interpreter;

import lombok.AllArgsConstructor;
import lombok.Data;

@Data
@AllArgsConstructor
public class Multiply extends AbstractExpression{

    public Multiply(AbstractExpression left,AbstractExpression right) {
        this.left=left;
        this.right=right;
    }


    @Override
    public int interpreter(Context context) {
        return left.interpreter(context)* right.interpreter(context);
    }
}
